<?php

class Model extends \Eloquent {

    protected $table ='model';

	protected $fillable = [
            'name',
            'table_name',
    ];

    public function fields()
    {
        return $this->hasMany('Field', 'model_id', 'id');
    }

    public function Categories()
    {
        return $this->hasMany('Category', 'model_id', 'id');
    }

}